package org.thistlesoft.socks.usermng.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.thistlesoft.core.exception.BusinessException;
import org.thistlesoft.socks.usermng.dao.UserDao;
import org.thistlesoft.socks.usermng.orm.User;

@Scope("prototype")@Service("userService")
public class UserService {

	@Autowired
	private UserDao userDao;
	
	public User get(Integer primaryKey) {
		User user = null;
		try {
			user = userDao.get(primaryKey);
		} catch (Exception e) {
			throw new BusinessException("111", e);
		}
		return user;
	}
}
